package com.bjsxt.buyaction.dao.impl;

import com.bjsxt.buyaction.dao.ItemDao;
import com.bjsxt.livegoods.pojo.Item;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.stereotype.Repository;

import org.springframework.data.mongodb.core.query.Query;


/**
 * @ClassName : ItemDaoImpl
 * @Description :
 * @Author : ZWZ
 * @Date: 2021/8/27 9:33
 */
@Repository
public class ItemDaoImpl implements ItemDao {

    @Autowired
    private MongoTemplate mongoTemplate;

    @Override
    public Item findItemById(String id) {
        return mongoTemplate.findById(id, Item.class);
    }
}
